<ui:composition template="/templates/default.xhtml"
				xmlns="http://www.w3.org/1999/xhtml"
				xmlns:h="http://java.sun.com/jsf/html"
				xmlns:f="http://java.sun.com/jsf/core"
				xmlns:o="http://openfaces.org/"
				xmlns:c="http://java.sun.com/jstl/core"
				xmlns:ui="http://java.sun.com/jsf/facelets">
				
    <ui:define name="title">OpenHDS - Pregnancy Outcome Details</ui:define>

	<ui:param name="crud" value="#{pregnancyOutcomeCrud}" />
	
          <ui:define name="listing">
		<ui:include src="list.xhtml" />
          </ui:define>
          
          <ui:define name="display">         		
  			<h:outputText value="#{navController.breadcrumbTrail}" />	
       		
              <h1>#{msg.pregnancyOutcomeDetail}</h1>
              <h:messages id="error" globalOnly="true" />
              <h:form id="pregnancyOutcomeForm">
              
              	<h:outputText styleClass="error" value="#{pregnancyOutcomeCrud.item.statusMessage}" />
              
                  <h:panelGrid columns="3">
                  
                  	  <h:outputText value="Mother Id:"/>
                      <h:outputText />
                      <h:outputText id="motherExtId" value="#{pregnancyOutcomeCrud.item.mother}" converter="#{individualExtIdConverter}" title="#{msg.tipIndivExtId}" />
                      
                      <h:outputText value="First Name of Mother:"/>
                      <h:outputText />
                      <h:outputText value="#{pregnancyOutcomeCrud.item.mother.firstName}" />
                      
					  <h:outputText value="Last Name of Mother:"/>
                      <h:outputText />
                      <h:outputText value="#{pregnancyOutcomeCrud.item.mother.lastName}" />
                     
                  	  <h:outputText value="#{msg.fieldWorkerId}:"/>
              		  <h:outputText />
              		  <h:outputText value="#{pregnancyOutcomeCrud.item.collectedBy}" converter="#{fieldWorkerExtIdConverter}"/>
              
                  	  <h:outputText value="Recorded Date (#{siteProperties.dateFormat})" />
                      <h:outputText />
                      <h:outputText id="date" value="#{pregnancyOutcomeCrud.item.recordedDate}" converter="#{calendarConverter}" />
                     
                      <h:outputText value="Reported By:"/>
              		  <img class="clickable" onclick="O$('popupWindowForReportedBy').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
              		  <h:outputText id="reportedBy" value="#{pregnancyOutcomeCrud.item.reportedBy}" />
              		                    
              		 <h:outputText value="House Id:"/>
            		 <h:outputText />
                     <h:outputText value="#{pregnancyOutcomeCrud.item.house}" converter="#{locationExtIdConverter}" />
            						
					 <h:outputText value="Household Id:"/>
	            	 <h:outputText />
	                 <h:outputText value="#{pregnancyOutcomeCrud.item.household}" converter="#{socialGroupExtIdConverter}" />
	            	                        
                     <h:outputText value="Household Name:"/>
                     <h:outputText />
                     <h:outputText id="householdName" value="#{pregnancyOutcomeCrud.item.household.groupName}" />                    
              		                    
              		 <h:outputText value="Mother's Line Number:"/>
                     <h:outputText />
                     <h:outputText id="lineNumber" value="#{pregnancyOutcomeCrud.item.motherLineNumber}" />     
              		                      
                     <h:outputText value="Date of Birth of child: (#{siteProperties.dateFormat})" />
                     <h:outputText />
                     <h:outputText value="#{pregnancyOutcomeCrud.item.dobChild}" converter="#{calendarConverter}" />
                      
                     <h:outputText value="Father Id:"/>
                     <h:outputText />
                     <h:outputText id="fatherExtId" value="#{pregnancyOutcomeCrud.item.father}" converter="#{individualExtIdConverter}" />
                 	
                 	 <h:outputText value="First Name of Father:"/>
                     <h:outputText />
                     <h:outputText value="#{pregnancyOutcomeCrud.item.father.firstName}" />
                    
				     <h:outputText value="Last Name of Father:"/>
                     <h:outputText />
                     <h:outputText value="#{pregnancyOutcomeCrud.item.father.lastName}" />
                       
                     <h:outputText value="Place of Birth:"/>
                     <img class="clickable" onclick="O$('popupWindowForPlaceOfBirth').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
                     <h:outputText id="placeOfBirth" value="#{pregnancyOutcomeCrud.item.placeOfBirth}" />
                     
                     <h:outputText value="If Place of Birth is other, please specify:"/>
                     <h:outputText />
                     <h:outputText value="#{pregnancyOutcomeCrud.item.placeOfBirthOther}" />

                     <h:outputText value="What was used in cutting the umbilical cord?:"/>
                     <img class="clickable" onclick="O$('popupWindowForUmbilicalCord').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
                     <h:outputText id="umbilicalCord" value="#{pregnancyOutcomeCrud.item.umbilicalCord}" />
                     
                     <h:outputText value="What was applied to the umbilical after it was cut?:"/>
                     <img class="clickable" onclick="O$('popupWindowForUmbilicalCordCut').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
                     <h:outputText id="umbilicalCordCut" value="#{pregnancyOutcomeCrud.item.umbilicalCordCut}" />
                     
                     <h:outputText value="If umbilical cord cut is other, please specify?:"/>
                     <h:outputText />
                     <h:outputText id="umbilicalCordCutOther" value="#{pregnancyOutcomeCrud.item.umbilicalCordCutOther}" />       
                     
                     <h:outputText value="Is this your first live birth?:"/>
                     <img class="clickable" onclick="O$('popupWindowForYesNo').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
                     <h:outputText id="firstLiveBirth" value="#{pregnancyOutcomeCrud.item.firstLiveBirth}" />
                     
                     <h:outputText value="How many live births have you had, including this child?"/>
                     <h:outputText />
                     <h:outputText id="liveBirthNum" value="#{pregnancyOutcomeCrud.item.numberOfLiveBirths}" />
				
                     <h:outputText value="Total number of children born from recent pregnancy:"/>
                     <h:outputText />
                     <h:outputText id="totalChildrenBorn" value="#{pregnancyOutcomeCrud.item.totalChildrenBorn}" />
                     
                     <h:outputText value="Number of live births from recent pregnancy:"/>
                     <h:outputText />
                     <h:outputText id="numLiveBirths" value="#{pregnancyOutcomeCrud.item.numLiveBirths}" />
                      
                 	 <h:outputText value="#{msg.visitId}:"/>
                 	 <h:outputText />
                 	 <h:outputText id="visit" value="#{pregnancyOutcomeCrud.item.visit}" converter="#{visitExtIdConverter}" title="#{msg.visitId}"/>

					 <f:verbatim><h3>Children Information</h3></f:verbatim>
					 <h:outputText />
					 <h:outputText />

                     <h:outputText value="Child Id:"/>
                     <h:outputText />
                     <h:outputText id="child1ExtId" value="#{pregnancyOutcomeCrud.item.child1}" converter="#{individualExtIdConverter}" title="#{msg.tipIndivExtId}" />
                     
                     <h:outputText value="First Name of Child:"/>
                     <h:outputText />
                     <h:outputText id="fnameOfChild1" value="#{pregnancyOutcomeCrud.item.child1.firstName}" />	  
                     
					 <h:outputText value="Last Name of Child:"/>
                     <h:outputText />
                     <h:outputText id="lnameOfChild1" value="#{pregnancyOutcomeCrud.item.child1.lastName}" />
                     	       
					 <h:outputText value="Sex:"/>
                     <img class="clickable" onclick="O$('popupWindowForSex').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
                     <h:outputText id="sexChild1" value="#{pregnancyOutcomeCrud.item.child1.gender}" />

                     <h:outputText value="Child Id:"/>
                     <h:outputText />
                     <h:outputText id="child2ExtId" value="#{pregnancyOutcomeCrud.item.child2}" converter="#{individualExtIdConverter}" title="#{msg.tipIndivExtId}" />
                     
                     <h:outputText value="First Name of Child:"/>
                     <h:outputText />
                     <h:outputText id="fnameOfChild2" value="#{pregnancyOutcomeCrud.item.child2.firstName}" />	  
                     
					 <h:outputText value="Last Name of Child:"/>
                     <h:outputText />
                     <h:outputText id="lnameOfChild2" value="#{pregnancyOutcomeCrud.item.child2.lastName}" />
                     	       
					 <h:outputText value="Sex:"/>
                     <img class="clickable" onclick="O$('popupWindowForSex').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
                     <h:outputText id="sexChild2" value="#{pregnancyOutcomeCrud.item.child2.gender}" />
                    
                     <f:verbatim><h3>Audit Information</h3></f:verbatim>
                     <h:outputText />
                     <h:outputText />
                    
					 <h:outputText value="#{msg.insertDate}"/>
	               	 <h:outputText />
	               	 <h:outputText value="#{pregnancyOutcomeCrud.item.insertDate}" converter="#{calendarConverter}" />
					
					 <h:outputText value="#{msg.insertBy}"/>
					 <h:outputText />
					 <h:outputText value="#{pregnancyOutcomeCrud.item.insertBy.fullName}" />
	
					 <h:outputText value="#{msg.dataStatus}"/>
	    			 <img class="clickable" onclick="O$('popupWindowForDataStatus').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
					 <h:outputText value="#{pregnancyOutcomeCrud.item.status}" />	
				</h:panelGrid>
                <br />
           		<h:commandButton action="#{pregnancyOutcomeCrud.editSetup}" value="#{msg.lblEdit}">
           			<f:setPropertyActionListener target="#{jsfService.itemId}" value="#{pregnancyOutcomeCrud.item.uuid}" />
       			</h:commandButton>
                <h:commandButton value="Cancel" immediate="true" action="cancel" rendered="#{flowScope.updating}" />
                </h:form>
                <br />
          </ui:define>
      </ui:composition>